<div style="margin: 20px">
    <form class="layui-form" action="">
        <div>
            <button type="button" class="layui-btn run layui-btn-sm" >沟通</button>
            <button type="button" class="layui-btn run layui-btn-sm" >关闭</button>
        </div>
    <table class="layui-table">
        <tr>
            <td>沟通人员:</td>
            <td><input type="text" name="title" lay-verify="title" autocomplete="off" id="inputUser" class="layui-input">
                <button type="button" class="layui-btn run layui-btn-sm"  id="selectUser" >人员选择器</button></td>
        </tr>
        <tr>
            <td>提醒消息方式:</td>
            <td>站内消息</td>
        </tr>
        <tr>
            <td>沟通内容:</td>
            <td><textarea  name="desc"  class="layui-textarea"></textarea></td>
        </tr>
    </table>
    </form>


</div>
<script>
    layui.use(['table','setter','element','util','layer'], function () {
        var setter = layui.setter
            , $ = layui.$
            , layer = layui.layer

        $("#selectUser").click(function () {
            openSysUserSelectorWin()
        })

        // 弹出“人员选择器”
        function openSysUserSelectorWin() {
            var userSelectorWin = null;
            parent.layer.open({
                type: 2,
                title: '人员选择器',
                area: ['980px', '630px'],
                resize: false,
                content: serverPath.systemPath+setter.openPath + setter.sysLinkPath+ "dialog/view/sysUserDialog",
                success: function (layero, index) {
                    userSelectorWin = parent.window[layero.find('iframe')[0]['name']];
                },
                end: function () {
                    layui.each(userSelectorWin.layui.userList, function (index, item) {
                        $("#inputUser").val($("#inputUser").val()+item.name+" ")
                    });
                }
            });
        }
    });
</script>
<style>
    .layui-input{
        width: 90%;
    }
</style>